package com.example.demo.repository.entity;

import com.alibaba.fastjson.JSON;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * TODO
 *
 * @author wuhong-016
 * @version v1.0.0
 * @time: 2021/10/16 17:19
 */
@Entity
@Table(name = "user", schema = "", catalog = "")
public class UserEntity implements Serializable {

    private static final long serialVersionUID = -1L;

    @Id
    @Column(name = "id",unique = true)
    private long id;
    @Column(name = "name")
    private String name;

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
